/** \file
 *	\brief Function for positions.
 */

#ifndef MDS_POSITION_INCLUDED
#define MDS_POSITION_INCLUDED 1


#include "../vector_set.h"

/** \brief Fortran ANINT in C
 *
 *	\param x a real.
 *	\return the nearest integer of x.
 */
Real mds_anint( Real x );

/**	\brief One coordinate PBC
 *
 *	\param x a real
 *	\return -L/2 <= mds_pbc1(x,L) <= L/2
 */
Real mds_pbc1( Real x, Real L );

/** \brief protype to apply PBC.
 */
typedef void (*mds_pbc_proc)( mds_vector *r, const mds_vector *box );

/** \brief no PBC
 */
void mds_pbc_none( mds_vector *r, const mds_vector *box );

/** \brief PBC on x,y,z 
 */
void mds_pbc_xyz(  mds_vector *r, const mds_vector *box );

/** \brief PBC on x,y
 */
void mds_pbx_xy(   mds_vector *r, const mds_vector *box );

/** \brief Random positions in a box 
 *
 *	\param position the positions to choose.
 *	\param n        number of positions.
 *	\param pbc      PBC function, not NULL. Use mds_pbc_none if needed.
 *	\param box      a valid box.
 */
void mds_position_initialize( mds_vector_set position, size_t n, mds_pbc_proc pbc, const mds_vector *box );







#endif
